package com.stylefeng.guns.modular.system.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 官网新闻表
 * </p>
 *
 * @author huangyuehong123
 * @since 2018-06-14
 */
@TableName("news")
public class News extends Model<News> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 父标题
     */
    @TableField("parent_title")
    private String parentTitle;
    /**
     * 标题
     */
    private String title;
    /**
     * 作者
     */
    private String author;
    /**
     * 类别
     */
    private Long category;
    /**
     * 新闻外图片(有些新闻附带的图片)
     */
    private String picture;
    /**
     * 新闻概述
     */
    private String description;

    /**
     * 关键词
     */
    private String keyword;

    /**
     * 转载处
     */
    @TableField("transmit_from")
    private String transmitFrom;

    /**
     * 阅读数
     */
    private Long readtimes;

    /**
     * 转载处
     */
    @TableField("external_link")
    private String externalLink;

    /**
     * 新闻内容
     */
    private String content;

    /**
     * 新闻的排序值（有些模块使用到，比如说政策法规，大部分使用create_time）
     */
    private Integer orderval;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 新闻是否展示（0：不展示，1：展示）
     */
    @TableField("is_show")
    private Integer isShow;

    /**
     * 新闻是否置顶（0：不置顶，1：置顶）
     */
    @TableField("is_top")
    private Integer isTop;
    /**
     * 新闻是否删除（0：不删除，1：删除）
     */
    @TableField("is_del")
    private Integer isDel;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getParentTitle() {
        return parentTitle;
    }

    public void setParentTitle(String parentTitle) {
        this.parentTitle = parentTitle;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getCategory() {
        return category;
    }

    public void setCategory(Long category) {
        this.category = category;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public Long getReadtimes() {
        return readtimes;
    }

    public void setReadtimes(Long readtimes) {
        this.readtimes = readtimes;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public String getExternalLink() {
        return externalLink;
    }

    public void setExternalLink(String externalLink) {
        this.externalLink = externalLink;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getOrderval() {
        return orderval;
    }

    public void setOrderval(Integer orderval) {
        this.orderval = orderval;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public Integer getIsTop() {
        return isTop;
    }
    public void setIsTop(Integer isTop) {
        this.isTop = isTop;
    }
    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getTransmitFrom() {
        return transmitFrom;
    }

    public void setTransmitFrom(String transmitFrom) {
        this.transmitFrom = transmitFrom;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "News{" +
        "id=" + id +
        ", title=" + title +
        ", category=" + category +
        ", picture=" + picture +
        ", description=" + description +
        ", transmitFrom=" + transmitFrom +
        ", author=" + author +
        ", content=" + content +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", isShow=" + isShow +
        ", isTop=" + isTop +
        ", isDel=" + isDel +
        "}";
    }
}
